import Home from '../pages/Home/Home'
import MyStore from '../pages/MyStore/ZxStore'
import merchantOrder from '../component/Order/merchantOrder'
import MyInfo from '../pages/MyInfo/MyInfo'
import MyIncome from '../pages/MyInfo/MyIncome'
import Details from '../pages/MyInfo/Details'
import Bankcard from '../pages/MyInfo/Bankcard'
import Password from '../pages/MyInfo/Password'
import Withdrawal from '../pages/MyInfo/Withdrawal'
import Goods from '../pages/Goods/Goods'
import GoodsZ from '../component/GoodsZ/GoodsZ'
import Login from '../pages/Login/Login'
import Registered from '../pages/Login/Registered'
import { OrderDetailsPending } from '../component/OrderDetails/OrderDetails'
import ZxVipCenter from '../pages/MyStore/ZxVipCenter'
import ZxComments from '../pages/MyStore/ZxComments'
import ZxMenuSet from '../pages/MyStore/ZxMenuSet'
//引入
export default [
    { path: '/', name: '默认', redirect: '/Login', meta: { isNeedLogin: false } },
    { path: '/Login', name: '登录', component: Login, meta: { isNeedLogin: false } },
    { path: '/Registered', name: '注册', component: Registered, meta: { isNeedLogin: false } },
    {
        path: '/Home',
        name: '主界面',
        component: Home,
        redirect: '/Home/Order',
        meta: { isNeedLogin: true },
        children: [
            { path: '/Home/Order', name: '订单', component: merchantOrder, meta: { isNeedLogin: true } },
            { path: '/Home/GoodsZ', name: '商品', component: GoodsZ, meta: { isNeedLogin: true } },
            { path: '/Home/MyStore', name: '店铺', component: MyStore, meta: { isNeedLogin: true } },
            { path: '/Home/MyInfo', name: '我的', component: MyInfo, meta: { isNeedLogin: true } },
            { path: '/Home/MyIncome', name: '我的收入', component: MyIncome, meta: { isNeedLogin: true } },
            { path: '/Home/Details', name: '账号明细', component: Details, meta: { isNeedLogin: true } },
            { path: '/Home/Bankcard', name: '我的银行卡', component: Bankcard, meta: { isNeedLogin: true } },
            { path: '/Home/Withdrawal', name: '提现记录', component: Withdrawal, meta: { isNeedLogin: true } },
            { path: '/Home/Password', name: '支付密码', component: Password, meta: { isNeedLogin: true } },
            /* 添加店铺的子路由 */
            { path: '/Home/ZxVipCenter', name: '店铺下的会员中心', component: ZxVipCenter, meta: { isNeedLogin: true } },
            { path: '/Home/ZxComments', name: '店铺下的店铺评价', component: ZxComments, meta: { isNeedLogin: true } },
            { path: '/Home/ZxMenuSet', name: '商品下的添加和修改菜品', component: ZxMenuSet, meta: { isNeedLogin: true } },
            //添加路由
            { path: '/Home/OrderDetails', name: '订单详情', component: OrderDetailsPending, meta: { isNeedLogin: true } },
        ]
    },
]